from django.db import models

# Create your models here.
class DB_hrefs(models.Model):
    name = models.CharField("超链接名字", max_length=100, null=True, blank=True)
    url = models.CharField("超链接地址", max_length=100, null=True, blank=True)


    def __str__(self):
        return self.name



class DB_duan(models.Model):
    name = models.CharField(max_length=20, null=True, blank=True, default="--")
    monitor_time = models.CharField(max_length=20, null=True, blank=True, default="60")
    monitor_host = models.CharField(default="--", max_length=20, null=True, blank=True)
    # 多个手机号和email 制定规范，  用英文逗号分隔0
    monitor_phone = models.CharField(max_length=20, null=True, blank=True, default="--")
    monitor_email = models.CharField(max_length=20, null=True, blank=True, default="--")
    monitor_dingtalk = models.CharField(max_length=500, null=True, blank=True, default="--")
    # 不同环境的域名
    host = models.CharField(max_length=500, null=True, blank=True, default="--")
    user = models.CharField(max_length=50, null=True, blank=True)
    max_bf = models.IntegerField(default=3)
    bf_browser = models.CharField(max_length=20, default="Chrome")
    jk_browser = models.CharField(max_length=20, default="Chrome")
    db_host = models.CharField(max_length=50, null=True, blank=True, default='--')
    db_port = models.CharField(max_length=10, null=True, blank=True, default='--')
    db_username = models.CharField(max_length=10, null=True, blank=True, default='--')
    db_password = models.CharField(max_length=10, null=True, blank=True, default='--')
    db_database = models.CharField(max_length=10, null=True, blank=True, default='--')

    def __str__(self):
        return self.name
